package com.yhgarden.bbs.mapper.system;

import com.yhgarden.bbs.entity.system.UserRole;
import com.yhgarden.bbs.entity.vo.role.UserRoleNameVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
* @author Laijiaxiang
* @since 2019-09-17
*/
public interface UserRoleMapper  {

    public int create(UserRole userRole);

    public int batchCreate(@Param("example") List<UserRole> userRoleList);

    public int update(UserRole userRole);

    public UserRole getById(@Param("id") String id);

    public List<UserRoleNameVo> getByUserId(@Param("userId") String userId);

    public UserRole getByIdForList(@Param("id") String id);

    public UserRole getByIdMoreDetail(@Param("id") String id);

    public int queryCount(@Param("example") UserRole userRole);

    public List<UserRole> query(@Param("example") UserRole userRole,
                                @Param("order") String order,
                                @Param("field") String field);

    public List<UserRole> queryForList(@Param("example") UserRole userRole,
                                       @Param("order") String order,
                                       @Param("field") String field);

    public List<UserRole> queryMoreDetail(@Param("example") UserRole userRole,
                                          @Param("order") String order,
                                          @Param("field") String field);

    public int delete(@Param("id") String id);

    public int deleteByExample(@Param("example") UserRole userRole);

    public int batchDelete(@Param("ids") List<String> ids);

}

